const knex = require("../db");

class UserService {
    // 获取用户信息
    async find(data) {
        try {
            const result = await knex("user").where("username", data.username).first();
            if (result) return result;
        } catch (error) {
            throw error;
        }
    }
}

module.exports = new UserService();
